$(function () {
	//用户点赞
	$("#like").click(function() {
		var that = $(this);
		var id = that.data('topdiaryid');
		$.ajax({ 
			 url: '/operate/like/' + id, 
			 type: "POST",
	         data: {},
	         dataType: "json",//请求数据类型
			 success: function(data){
				 if(data.code == 0){
					
				 }else{
					 layer.msg(data.msg,{icon : 5});
				 }
			 },
			 error : function() {
				 layer.msg('服务器异常',{icon : 7});
			 }
		 })
	});
})